package com.hbt.mycloud_consumer.consumer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class MyController {

    @Autowired
    private RestTemplate restTemplate;
    @Autowired
    MyService myService;

    @RequestMapping("/consumer/login")
    public String login(){
        System.out.println("进入consumer login");
        String mystr = myService.login();
        System.out.println("从provider获得的strs："+mystr);
        return "consumer login:"+mystr;
    }
}
